<?php

/**
 * Detallepozo filter form base class.
 *
 * @package    prode
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseDetallepozoFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'porcentajeganancia' => new sfWidgetFormFilterInput(),
      'montoxapuesta'      => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'porcentajeganancia' => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'montoxapuesta'      => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
    ));

    $this->widgetSchema->setNameFormat('detallepozo_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Detallepozo';
  }

  public function getFields()
  {
    return array(
      'pozo_id'            => 'ForeignKey',
      'apuesta_id'         => 'ForeignKey',
      'porcentajeganancia' => 'Number',
      'montoxapuesta'      => 'Number',
    );
  }
}
